<?php

/**
 * MaterialI18n form base class.
 *
 * @package    alika
 * @subpackage form
 * @author     Your name here
 * @version    SVN: $Id: sfPropelFormGeneratedTemplate.php 16976 2009-04-04 12:47:44Z fabien $
 */
class BaseMaterialI18nForm extends BaseFormPropel
{
  public function setup()
  {
    $this->setWidgets(array(
      'material_id'        => new sfWidgetFormInputHidden(),
      'culture'            => new sfWidgetFormInputHidden(),
      'ishort_description' => new sfWidgetFormTextarea(),
      'ifull_description'  => new sfWidgetFormTextarea(),
      'ititle'             => new sfWidgetFormInput(),
      'seo_idescription'   => new sfWidgetFormTextarea(),
      'seo_ikeyword'       => new sfWidgetFormTextarea(),
      'seo_ititle'         => new sfWidgetFormInput(),
    ));

    $this->setValidators(array(
      'material_id'        => new sfValidatorPropelChoice(array('model' => 'Material', 'column' => 'id', 'required' => false)),
      'culture'            => new sfValidatorPropelChoice(array('model' => 'MaterialI18n', 'column' => 'culture', 'required' => false)),
      'ishort_description' => new sfValidatorString(array('required' => false)),
      'ifull_description'  => new sfValidatorString(array('required' => false)),
      'ititle'             => new sfValidatorString(array('max_length' => 250, 'required' => false)),
      'seo_idescription'   => new sfValidatorString(array('required' => false)),
      'seo_ikeyword'       => new sfValidatorString(array('required' => false)),
      'seo_ititle'         => new sfValidatorString(array('max_length' => 250, 'required' => false)),
    ));

    $this->widgetSchema->setNameFormat('material_i18n[%s]');

    $this->errorSchema = new sfValidatorErrorSchema($this->validatorSchema);

    parent::setup();
  }

  public function getModelName()
  {
    return 'MaterialI18n';
  }


}
